﻿@{
    ViewBag.Title = "Thanh toán - Xác nhận đơn hàng";
}

@model PaymentHelper.ProcessPaymentRequest
@using OnlineShop.Common

<div class="main_box">
    <h3 id="checkout">
        Thanh toán - Xác nhận đơn hàng</h3>
    <div class="content_main_box" style="background-color: white;">
        @using (Html.BeginForm("DoPayment", "Payment", FormMethod.Post))
        {
            <div class="info_register payment">
                <fieldset>
                    <legend>Thông tin đơn hàng</legend>
                    <table>
                        <tr>
                            <td class="label" style="width:110px;">
                                Người mua
                            </td>
                            <td class="value" style="width:300px;">
                                @(Model.Order.BillingAddress.FirstName + " " + Model.Order.BillingAddress.LastName)
                            </td>
                        </tr>
                        <tr>
                            <td class="label">
                                Địa chỉ
                            </td>
                            <td class="value">
                                @(Model.Order.BillingAddress.Address1 + " - " + Model.Order.BillingAddress.City)
                            </td>
                        </tr>
                        <tr>
                            <td class="label">
                                Điện thoại
                            </td>
                            <td class="value">
                                @Model.Order.BillingAddress.PhoneNumber
                            </td>
                        </tr>
                        <tr>
                            <td class="label">
                                Địa chỉ giao hàng
                            </td>
                            <td class="value">
                                @(Model.Order.ShippingAddress.FirstName + " " + Model.Order.ShippingAddress.LastName + ", ")
                                @(Model.Order.ShippingAddress.Address1 + " - " + Model.Order.ShippingAddress.City)
                            </td>
                        </tr>
                        <tr>
                            <td class="label">
                                Phí giao hàng
                            </td>
                            <td class="value">
                                @Model.Order.ShippingFee.FormatUSD() 
                            </td>
                        </tr>
                        <tr>
                            <td class="label">
                                Thuế
                            </td>
                            <td class="value">
                                @Model.Order.TaxFee.FormatUSD()
                            </td>
                        </tr>
                        <tr>
                            <td class="label">
                                Phí thanh toán
                            </td>
                            <td class="value">
                                @ViewBag.HandlingFee
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>   
                  
            Html.RenderAction("ShowCart", "Cart"); 
            
            <p style="text-align:right;padding:8px;border:1px solid #b4b4b4;margin-right:10px;font-weight:bold;">Tổng giá trị hóa đơn: <strong style="color:Red;font-size:15px;">@("$" + ViewBag.TotalOrder.ToString("0,00"))</strong></p>
            
            <div class="btn_control">
                <p style="text-align: center;">
                    <input type="button" value="Hủy bỏ" onclick="location='../Home'" class="btn_orange" />
                    <input type="submit" value="Hoàn thành" class="btn_orange" />
                </p>
            </div>
        }
    </div>
</div>
<!-- kết thúc .mainbox-->

